using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using SailHero.Soft.FrameWork.Models;

namespace SailHero.Soft.FrameWork.Mapping.HJT212DB
{
    public class CMD_SendMap : EntityTypeConfiguration<CMD_Send>
    {
        public CMD_SendMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ID)
                .IsRequired()
                .HasMaxLength(32);

            this.Property(t => t.SID)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.ST)
                .HasMaxLength(10);

            this.Property(t => t.CN)
                .HasMaxLength(10);

            this.Property(t => t.MN)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.PW)
                .HasMaxLength(10);

            this.Property(t => t.QN)
                .HasMaxLength(20);

            this.Property(t => t.CP)
                .HasMaxLength(500);

            this.Property(t => t.Content)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("CMD_Send");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.SID).HasColumnName("SID");
            this.Property(t => t.ST).HasColumnName("ST");
            this.Property(t => t.CN).HasColumnName("CN");
            this.Property(t => t.MN).HasColumnName("MN");
            this.Property(t => t.PW).HasColumnName("PW");
            this.Property(t => t.QN).HasColumnName("QN");
            this.Property(t => t.CP).HasColumnName("CP");
            this.Property(t => t.RecordTime).HasColumnName("RecordTime");
            this.Property(t => t.isSend).HasColumnName("isSend");
            this.Property(t => t.Content).HasColumnName("Content");
        }
    }
}
